#pragma once

#include <QtCore/QtGlobal>
#include "GUIWidget/GUIWidgetBase.h"


namespace EventOper 
{
	class ParaWidgetInterfaceOperator;
}

namespace Ui 
{
	class GUICfgPhysicalSettingWidget;
}

namespace Interface 
{
	class FITKCDCfgPSetPhysical;
	class FITKCDCfgPSetSwitch;
}


namespace GUI
{
	class MainWindow;
	class GUIWIDGETAPI GUICfgPhysicalSettingWidget : public GUIWidgetBase
	{
		Q_OBJECT
	public:
		GUICfgPhysicalSettingWidget(EventOper::ParaWidgetInterfaceOperator* oper, QWidget* parent = nullptr);
		~GUICfgPhysicalSettingWidget();

		void init();

    private slots:
		void on_doubleSpinBox_Gravity0_valueChanged(double value);
		void on_doubleSpinBox_Gravity1_valueChanged(double value);
		void on_doubleSpinBox_Gravity2_valueChanged(double value);
		void on_doubleSpinBox_SpsSmag_valueChanged(double value);
		void on_doubleSpinBox_SpsBlin_valueChanged(double value);
		void on_doubleSpinBox_Alpavisc_valueChanged(double value);
		void on_checkBox_Realvisc_stateChanged(int state);

		void on_checkBox_Pressure_Threshold_stateChanged(int state);
		void on_doubleSpinBox_Minimum_Pressure_valueChanged(double value);
		void on_checkBox_Density_Reinitial_stateChanged(int state);
		void on_spinBox_Reinitial_Steps_valueChanged(int value);
		void on_checkBox_Tic_stateChanged(int state);
		void on_checkBox_Resort_Fluid_stateChanged(int state);
		void on_checkBox_Slip_stateChanged(int state);
		void on_checkBox_LJ_Force_stateChanged(int state);
		void on_doubleSpinBox_LJ_Param_valueChanged(double value);
		void on_checkBox_PST_stateChanged(int state);

    private:
		void setDataToWidget();

    private:
        EventOper::ParaWidgetInterfaceOperator* _oper = nullptr;
		Ui::GUICfgPhysicalSettingWidget* _ui = nullptr;

		Interface::FITKCDCfgPSetPhysical* _pPhysical;
		Interface::FITKCDCfgPSetSwitch* _pSwitch;
	};
}